#include<stdio.h>
int main()
{    
    float t,p;
	printf("please enter leave factory month and original price\n");
	scanf("%f,%f",&t,&p);
	if(t<3)
	     printf("price is %f\n",p);
    else if(t<6)
	     printf("price is %f\n",p=p*(1-0.02));
	else if(t<12)
	     printf("price is %f\n",p=p*(1-0.05));     
    else if(t<21)
	     printf("price is %f\n",p=p*(1-0.08));
    else
	     printf("price is %f\n",p=p*(1-0.1));
    return 0;
}


